﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    xmlns:settings="clr-namespace:ModernUILogViewer.Settings"                    
                    xmlns:view="clr-namespace:ModernUILogViewer.View"
                    xmlns:chartingprimitive="clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit"
                    xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
                    xmlns:datavis="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
                    >

    <Style x:Key="LegendStyle2" TargetType="datavis:Legend">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Control.BorderBrush" Value="{DynamicResource ButtonBorder}" />
        <Setter Property="Control.Background" Value="Transparent" />
        <!--<Setter Property="Width" Value="0"></Setter>
            <Setter Property="Height" Value="0"></Setter>-->
        <Setter Property="Visibility" Value="Hidden"></Setter>
        <Setter Property="BorderThickness" Value="0" />
    </Style>

    <Style x:Key="LegendItemCollapsed" TargetType="{x:Type charting:LegendItem}">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>
    
    <Style x:Key="LegendItemStyle2" TargetType="{x:Type charting:LegendItem}">
        <Setter Property="IsTabStop" Value="False"/>        
        <Setter Property="Template">            
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type charting:LegendItem}">                    
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                        <StackPanel Orientation="Horizontal">
                            <Border Background="{Binding Background}" Height="10" Width="10" Margin="0,0,3,0" CornerRadius="2, 2, 2, 2" />
                            <datavis:Title Content="{TemplateBinding Content}"/>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- font style copied from ModernUI Heading1 -->
    <Style x:Key="TitleStyle2" TargetType="{x:Type datavis:Title}">
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Margin" Value="0, 10"/>
    </Style>

    <Style TargetType="{x:Type charting:Chart}">        
        <Setter Property="PlotAreaStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Grid}">
                    <Setter Property="Background" Value="Transparent"/>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="Template2" TargetType="charting:Chart">
        <Border Background="{TemplateBinding Control.Background}"
                    BorderBrush="{DynamicResource ButtonBorder}"
                    BorderThickness="{TemplateBinding Control.BorderThickness}"
                    Padding="{TemplateBinding Control.Padding}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <datavis:Title 
                    Content="{TemplateBinding charting:Chart.Title}" 
                    Style="{TemplateBinding charting:Chart.TitleStyle}" />
                <Grid Grid.Row="1" Margin="0,15">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <datavis:Legend Name="Legend"
                            Title="{TemplateBinding charting:Chart.LegendTitle}"
                            Grid.Column="1"
                            Style="{TemplateBinding charting:Chart.LegendStyle}" />
                    <chartingprimitive:EdgePanel Name="ChartArea" Style="{TemplateBinding charting:Chart.ChartAreaStyle}">
                        <Grid Panel.ZIndex="-1" Style="{TemplateBinding charting:Chart.PlotAreaStyle}" />
                        <!--<Border Panel.ZIndex="10"
                                    BorderBrush="#FF919191"
                                    BorderThickness="1" />-->

                    </chartingprimitive:EdgePanel>
                </Grid>
            </Grid>
        </Border>
    </ControlTemplate>

</ResourceDictionary>